import time
from  selenium import webdriver
from selenium.webdriver import ActionChains
from selenium.webdriver.common.by import By
from unittest import  TestCase
from ddt import ddt,data,unpack

class Testjijin(TestCase):
    def testjijin1(self):
        username='lisi'
        password='123456'
        payword='666666'
        expect="买入成功!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div[1]/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()
        time.sleep(3)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(3)
        result = driver.find_element(By.XPATH,"/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div").text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin1' + ".jpg")
        else:
            pass
        driver.quit()


    def testjijin2(self):
        username='lisi'
        password='123456'
        payword='6666667'
        expect="买入失败!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div[1]/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()
        time.sleep(3)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(3)
        result = driver.find_element(By.XPATH,"/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div").text
        if self.assertEqual(expect, result)=='true':
            driver.save_screenshot('testjijin2' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin3(self):
        username='lisi4'
        password='123456'
        payword='666666'
        expect="买入失败!，银行卡余额不足"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div[1]/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(3)
        result = driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div").text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin3' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin4(self):
        username='lisi5'
        password='123456'
        payword='666666'
        expect="买入失败!，请绑定银行卡"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[1]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div[1]/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[6]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(3)
        result = driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div").text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin4' + ".jpg")
        else:
            pass
        driver.quit()



    def testjijin5(self):
        username='lisi'
        password='123456'
        payword='666666'
        expect="买入成功!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH, '/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin5' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin6(self):
        username='lisi'
        password='123456'
        payword='6666667'
        expect="买入失败!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin6' + ".jpg")
        else:
            pass
        driver.quit()


    def testjijin7(self):
        username='lisi4'
        password='123456'
        payword='666666'
        expect="买入失败!，银行卡余额不足"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin7' + ".jpg")
        else:
            pass
        driver.quit()


    def testjijin8(self):
        username='lisi5'
        password='123456'
        payword='666666'
        expect="买入失败!，请绑定银行卡"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[8]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin8' + ".jpg")
        else:
            pass
        driver.quit()




    def testjijin9(self):
        username='lisi'
        password='123456'
        payword='666666'
        expect="买入成功!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin9' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin10(self):
        username='lisi'
        password='123456'
        payword='6666667'
        expect="买入失败!"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin10' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin11(self):
        username='lisi4'
        password='123456'
        payword='666666'
        expect="买入失败!，银行卡余额不足"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin11' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin12(self):
        username='lisi5'
        password='123456'
        payword='666666'
        expect="买入失败!，请绑定银行卡"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin12' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin13(self):
        username = 'lisi6'
        password = '123456'
        payword = '666666'
        expect = "买入失败!,请前往个人信息设置支付密码"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH,'/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[3]/div/div').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin13' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin14(self):
        username = 'lisi7'
        password = '123456'
        payword = '666666'
        expect = "账户余额：7000.00元"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
        time.sleep(2)
        driver.find_element(By.XPATH, "/html/body/div[1]/div/aside/div[2]/nav/ul/li[4]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[4]/ul/li[3]/a").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH, '/html/body/div/div/main/div/div/div[2]/div/div/div[2]/h4[2]').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin14' + ".jpg")
        else:
            pass
        driver.quit()

    def testjijin15(self):
        username = 'lisi7'
        password = '123456'
        payword = '666666'
        expect = "账户余额：7000.00元"
        driver = webdriver.Chrome()
        driver.get("http://localhost:90")
        driver.maximize_window()
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@name='username']").send_keys(username)
        time.sleep(1)
        driver.find_element(By.XPATH, "//input[@id='password']").send_keys(password)
        time.sleep(1)
        driver.find_element(By.ID, "login_btn").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div/div/aside/div[2]/nav/ul/li[4]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[4]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div/div/main/div/div/div[3]/div/div/div[1]/ul/li/button[3]").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/a").click()  #
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[2]/ul/li[3]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH,"/html/body/div/div/main/div/div/div/div/div[2]/div/table/tbody/tr[1]/td[9]/button").click()
        time.sleep(1)
        driver.find_element(By.CSS_SELECTOR, ".layui-layer-content > #password").send_keys(payword)
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='layui-layer1']/div[3]/a[1]").click()
        time.sleep(2)
        driver.find_element(By.XPATH,"/html/body/div[3]/div[2]/div/div/div/div/div/div/div/div[4]/button").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "/html/body/div/div/aside/div[2]/nav/ul/li[4]/a").click()
        time.sleep(1)
        driver.find_element(By.XPATH, "//*[@id='leftbaraside']/div[2]/nav/ul/li[4]/ul/li[3]/a").click()
        time.sleep(1)
        result = driver.find_element(By.XPATH, '/html/body/div/div/main/div/div/div[3]/div/div/div[2]/h4[2]').text
        if self.assertEqual(expect, result):
            driver.save_screenshot('testjijin15' + ".jpg")
        else:
            pass
        driver.quit()
